import navRequest from "../utils/request/navRequest";


interface NavData {
    columnUrl: string
    id: number
    mainTitle: string
    onlineType: boolean
    picUrl: string
    rank: number
    vaildEndTime: number
    vaildStartTime: number
    viceTitle: string
}
interface CategoryData {
    appBanHeight: number,
    appBanWidth: number
    appStatus: string
    avatar: string
    buyNow: null
    categoryIds: string
    content: null
    duration: number
    hasLookCollects: boolean
    hasVideo: boolean
    height: number
    itemIdList: number[]
    itemList: null
    layoutType: number
    lookList: null
    newAppBanner: string
    newAppBannerHeight: number
    newAppBannerWidth: number
    nickname: string
    pcBannerSize: null
    picUrl: string
    pubType: number
    readCount: number
    schemeUrl: string
    size: 0
    status: string
    statusValid: boolean
    style: number
    subTitle: string
    timeStamp: number
    title: string
    topType: boolean
    topicExtend: null
    topicId: string
    type: number
    videoUrl: null
    wapStatus: string
    width: number
}

export type CategoryListData = CategoryData[];
export type NavListData = NavData[];
/**
 * 请求值得购买页面的轮播图数据
 * @returns   Promise
 * @author    xj
 */
export const ReqNavWap = () => navRequest.get<any, NavListData>("/v1/know/navWap.json")


/**
 * 请求瀑布流数据
 * @returns   Promise
 * @author    xj
 */
export const ReqWaterfallFlow = (page: any, size: any) => navRequest.get<any, CategoryListData>(`/v1/find/recAuto.json?page=${page}&size=${size}&exceptIds=`)